import { ISchema } from "@formily/antd";
import proxy from '../../../../config/proxy';
import png1 from './img/1.png';
import png2 from './img/2.png';
import png3 from './img/3.png';
import png4 from './img/4.jpg';

interface Config {
    id: string,
    type: string,
    preview: string,
    properties: ISchema | undefined
}
export const ChartsConfig: Config[] = [

    {
        id: 'LineChart',
        type: '折线图',
        preview: png1,
        // preview: proxy.dev['/AllLinks'].target+'file/system_down/png/1.png',
        // preview: 'https://z.alicdn.com/alickn/chu-ko-no/2020-4-18/bizcharts/7362edf6-3fef-42b2-aafa-82c01d8d0ddc/7362edf6-3fef-42b2-aafa-82c01d8d0ddc.png',
        properties: {
            "type": "object",
            properties: {
                "title": {
                    "type": "string",
                    "title": "名称",
                    "x-component": "input"
                },
                "x": {
                    "type": "string",
                    "title": "X轴",
                    "x-component": "input"
                },
                "y": {
                    "type": "string",
                    "title": "Y轴",
                    "x-component": "input"
                },
                "properties": {
                    "type": "string",
                    "title": "设备属性",
                    "x-component": "select",
                    "enum": [],
                    // "x-props": {
                    // "hasFeedback": true
                    // }
                },
                "cols": {
                    "type": "string",
                    "title": "配置",
                    "x-component": "input"
                }
            }
        }
    },
    {
        id: 'ColumnChart',
        type: '柱形图',
        preview: png2,
        // preview: proxy.dev['/AllLinks'].target+'file/system_down/png/2.png',
        // preview: 'https://z.alicdn.com/alickn/chu-ko-no/2020-4-18/bizcharts/1ac2ed65-5911-4422-8f6f-8b4b719d8555/1ac2ed65-5911-4422-8f6f-8b4b719d8555.png',
        properties: {
            "type": "object",
            "properties": {
                "NO_NAME_FIELD_$0": {
                    "type": "object",
                    "x-component": "card",
                    "x-component-props": {
                        "title": "基本信息"
                    },
                    properties: {
                        "title": {
                            "type": "string",
                            "title": "名称",
                            "x-component": "input"
                        },
                        "data": {
                            "type": "string",
                            "title": "数据",
                            "x-component": "input"
                        },
                        "cols": {
                            "type": "string",
                            "title": "配置",
                            "x-component": "input"
                        }
                    }
                }
            }
        }
    },
    {
        id: 'GaugeChart',
        type: '柱形图',
        preview: png3,
        // preview: proxy.dev['/AllLinks'].target+'file/system_down/png/3.png',
        // preview: 'https://z.alicdn.com/alickn/chu-ko-no/2020-4-18/bizcharts/82f5bedc-7eee-43af-8ee4-18033826d03a/82f5bedc-7eee-43af-8ee4-18033826d03a.png',
        properties: {
            "type": "object",
            "properties": {
                "NO_NAME_FIELD_$0": {
                    "type": "object",
                    "x-component": "card",
                    "x-component-props": {
                        "title": "基本信息"
                    },
                    properties: {
                        "title": {
                            "type": "string",
                            "title": "名称",
                            "x-component": "input"
                        },
                        "data": {
                            "type": "string",
                            "title": "数据",
                            "x-component": "input"
                        },
                        "cols": {
                            "type": "string",
                            "title": "配置",
                            "x-component": "input"
                        }
                    }
                }
            }
        }
    },
    {
        id: 'Video',
        type: '视频',
        preview: png4,
        // preview: proxy.dev['/AllLinks'].target+'file/system_down/png/4.jpg',
        // preview: 'https://misc.aotu.io/booxood/mobile-video/cover_900x500.jpg',
        properties: {
            "type": "object",
            "properties": {

            }
        }
    },
    {
        id: 'Action',
        type: '操作',
        preview: 'http://pic59.nipic.com/file/20150126/10989170_123658553000_2.jpg',
        properties: {}
    }
];
